/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Cadastro;

import java.util.Objects;

/**
 *
 * @author Allan
 */
public class Funcionarios {
    
    private long id;
    private String codfun;
    private String nomefun;
    private String rgfun;
    private String cpffun;
    
    private SexoType sexo;
    
    private Endereco endereco;
    
    private Contato contato;

    public Funcionarios() {
    }

    public Funcionarios(long id, String codfun, String nomefun, String rgfun, String cpffun, SexoType sexo, Endereco endereco, Contato contato) {
        this.id = id;
        this.codfun = codfun;
        this.nomefun = nomefun;
        this.rgfun = rgfun;
        this.cpffun = cpffun;
        this.sexo = sexo;
        this.endereco = endereco;
        this.contato = contato;
    }

    public Funcionarios(String codfun, String nomefun, String rgfun, String cpffun, SexoType sexo) {
        this.codfun = codfun;
        this.nomefun = nomefun;
        this.rgfun = rgfun;
        this.cpffun = cpffun;
        this.sexo = sexo;
    }

    public Funcionarios(long id, String codfun, String nomefun, String rgfun, String cpffun, SexoType sexo) {
        this.id = id;
        this.codfun = codfun;
        this.nomefun = nomefun;
        this.rgfun = rgfun;
        this.cpffun = cpffun;
        this.sexo = sexo;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getCodfun() {
        return codfun;
    }

    public void setCodfun(String codfun) {
        this.codfun = codfun;
    }

    public String getNomefun() {
        return nomefun;
    }

    public void setNomefun(String nomefun) {
        this.nomefun = nomefun;
    }

    public String getRgfun() {
        return rgfun;
    }

    public void setRgfun(String rgfun) {
        this.rgfun = rgfun;
    }

    public String getCpffun() {
        return cpffun;
    }

    public void setCpffun(String cpffun) {
        this.cpffun = cpffun;
    }

    public SexoType getSexo() {
        return sexo;
    }

    public void setSexo(SexoType sexo) {
        this.sexo = sexo;
    }

    public Endereco getEndereco() {
        return endereco;
    }

    public void setEndereco(Endereco endereco) {
        this.endereco = endereco;
    }

    public Contato getContato() {
        return contato;
    }

    public void setContato(Contato contato) {
        this.contato = contato;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 37 * hash + (int) (this.id ^ (this.id >>> 32));
        hash = 37 * hash + Objects.hashCode(this.codfun);
        hash = 37 * hash + Objects.hashCode(this.nomefun);
        hash = 37 * hash + Objects.hashCode(this.rgfun);
        hash = 37 * hash + Objects.hashCode(this.cpffun);
        hash = 37 * hash + (this.sexo != null ? this.sexo.hashCode() : 0);
        hash = 37 * hash + Objects.hashCode(this.endereco);
        hash = 37 * hash + Objects.hashCode(this.contato);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Funcionarios other = (Funcionarios) obj;
        if (this.id != other.id) {
            return false;
        }
        if (!Objects.equals(this.codfun, other.codfun)) {
            return false;
        }
        if (!Objects.equals(this.nomefun, other.nomefun)) {
            return false;
        }
        if (!Objects.equals(this.rgfun, other.rgfun)) {
            return false;
        }
        if (!Objects.equals(this.cpffun, other.cpffun)) {
            return false;
        }
        if (this.sexo != other.sexo) {
            return false;
        }
        if (!Objects.equals(this.endereco, other.endereco)) {
            return false;
        }
        if (!Objects.equals(this.contato, other.contato)) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Funcionarios{" + "id=" + id + ", codfun=" + codfun + ", nomefun=" + nomefun + ", rgfun=" + rgfun + ", cpffun=" + cpffun + ", sexo=" + sexo + ", endereco=" + endereco + ", contato=" + contato + '}';
    }
    
    
          
    
    
    
    
}
